﻿// 作者: du白
// 邮箱: weichen0716@163.com

using WebPrinter.Library;
using WebPrinter.Library.DaQu;

class Program
{
    static async Task Main(string[] args)
    {
        var client = PrinterClientFactory.Create(PrinterBrand.Daqu, "开发者AppId", "你的appsecrect");

        // 绑定打印机
        var addResult = await client.AddPrinterAsync("设备sn", "设备key","测试添加-打印机1号");
        Console.WriteLine($"绑定结果: {addResult.Success}, {addResult.Message}");

        // 打印小票
        var printResult = await client.PrintReceiptAsync("设备sn", "==测试打印==");
        Console.WriteLine($"打印结果: {printResult.Success}, {printResult.Message}");
    }
}
